<form class="layui-form layui-card" data-table-id="MerchantTable" action="{:sysuri()}" data-auto="true" method="post">

    <div class="layui-card-body">

        <!-- 商家名称 -->
        <div class="layui-form-item">
            <label class="layui-form-label">商家名称</label>
            <div class="layui-input-block">
                <input name="name" value='{$vo.name|default=""}' lay-verify="required" placeholder="请输入商家名称" class="layui-input">
            </div>
        </div>

        <!--{notempty name='cate_list'}-->
        <div class="layui-form-item">
            <label class="layui-form-label"><b>所属分类</b></label>
            <div class="layui-input-block">
                <select class="layui-select" lay-verify="required" lay-search name="cate_id">
                    {foreach $cate_list as $cate}
                    {if isset($vo.cate_id) && $vo.cate_id == $cate.id}
                        <option selected value="{$cate.id}">{$cate.cate_name}</option>
                    {else}
                    <option value="{$cate.id}">{$cate.cate_name}</option>
                    {/if}{/foreach}
                </select>
            </div>
           
        </div>
        <!--{/notempty}-->

        <!-- 商家图片 -->
        <div class="layui-form-item">
            <label class="layui-form-label">商家LOGO及轮播展示图片</label>
            <div class="layui-input-block">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th class="text-center">LOGO</th>
                        <th class="text-left">展示图片</th>
                    </tr>
                    <tr>
                        <td width="90px" class="text-center"><input name="thumb" type="hidden" value="{$vo.thumb|default=''}"></td>
                        <td width="auto" class="text-left"><input name="slides" type="hidden" value="{$vo.slides|default=''}"></td>
                    </tr>
                    </thead>
                </table>
            </div>

            <script>$('[name="thumb"]').uploadOneImage(), $('[name="slides"]').uploadMultipleImage()</script>
        </div>

        <!-- 联系人 -->
        <div class="layui-form-item">
            <label class="layui-form-label" >联系人</label>
            <div class="layui-input-block">
                <input name="contact" lay-verify="required"value='{$vo.contact|default=""}' placeholder="请输入联系人" class="layui-input">
            </div>
        </div>

        <!-- 联系方式 -->
        <div class="layui-form-item">
            <label class="layui-form-label">联系方式</label>
            <div class="layui-input-block">
                <input name="mobile" lay-verify="required" value='{$vo.mobile|default=""}' placeholder="请输入联系方式" class="layui-input">
            </div>
        </div>

        <!-- 详细地址 -->
        <div class="layui-form-item">
            <label class="layui-form-label">详细地址</label>
            <div class="layui-input-block">
                <input name="address_detail" lay-verify="required" value='{$vo.address_detail|default=""}' placeholder="请输入详细地址" class="layui-input">
            </div>
        </div>

        <!-- 营业时间 -->
        <div class="layui-form-item">
            <label class="layui-form-label">营业时间</label>
            <div class="layui-input-block">
                <input name="open_time" lay-verify="required" value='{$vo.open_time|default=""}' placeholder="请输入营业时间" class="layui-input" type="time">
            </div>
        </div>

        <!-- 打烊时间 -->
        <div class="layui-form-item">
            <label class="layui-form-label">打烊时间</label>
            <div class="layui-input-block">
                <input name="close_time" lay-verify="required"  value='{$vo.close_time|default=""}' placeholder="请输入打烊时间" class="layui-input" type="time">
            </div>
        </div>

        <!-- 经度 -->
        <div class="layui-form-item">
            <label class="layui-form-label">经度</label>
            <div class="layui-input-block">
                <input name="latitude" value='{$vo.latitude|default=""}' placeholder="请输入经度" class="layui-input">
            </div>
        </div>

        <!-- 纬度 -->
        <div class="layui-form-item">
            <label class="layui-form-label">纬度</label>
            <div class="layui-input-block">
                <input name="longitude" value='{$vo.longitude|default=""}' placeholder="请输入纬度" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input name="sort" value='{$vo.sort|default="0"}' placeholder="请输入排序" class="layui-input">
            </div>
        </div>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>

{block name='script'}
<script>
    // 这里可以添加一些自定义的JavaScript代码
</script>
{/block}